home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1994 November / macformat-018.iso / Utility Spectacular / Developer / Translate 1.0 folder / Doc Translate (text) next >
Encoding:
Text File  |  1991-03-25  |  3.4 KB  |  70 lines  |  [TEXT/MPS ]

  1. Translate is a dcmd (MacsBug command), which displays information
  2. relative to the way the PMMU will translate virtual addresses into
  3. physical addresses. It is an emulation of the command PTEST, but gives
  4. much more details. It is primarly for people who hack into their computer
  5. or program very subtle things which require physical addresses (anything
  6. that deals with a hardware device for instance). The normal end-user should
  7. not worry about this program.
  8.  
  9. The output looks like this :
  10.  
  11. Level    Type   Base Address  Offset  Desc Address  Flags
  12.   RP    4 Byte    00003CD0     0000     00003CD0
  13.   A     4 Byte    0001A090     0050     0001A1D0      U
  14.   B    Page Desc  00050000     0016     00050016        M
  15.  
  16. What does that mean ?
  17.  
  18. Well, first the address is in memory, since the translation finishes
  19. by a "Page Descripto". And the address of the page is $50000, the
  20. translated address being $50016, which only includes the offset inside
  21. the page.
  22.  
  23. The order of search is as follow : the CPU looks in a register called the
  24. Root Pointer (RP), and gets the address in memory of the first descriptor.
  25. This descriptor gives then another address of another descriptor, and it
  26. goes on until we reach a "Page Descriptor" or an "Invalid Descriptor". Being
  27. Invalid means that the page is not resident in memory at the moment.
  28.  
  29. You can try with MacsBug to find a non resident page. Then try (still with
  30. MacsBug) to read at this address : you will hear the drive click, and if
  31. you ask for the translation again, you will see that the page now resides
  32. in memory. The same behavior happens with flags : if a page hasn't been
  33. used or modified (U and M flags), try reading or writing there. Automatically
  34. the flags will be updated. There are other flags (WP,CI…) but I never found
  35. any situation where they would appear. If you find one…
  36.  
  37. The installation is very simple : just copy (with ResEdit) the resource "dcmd"
  38. of the file "Translate" into the file "Debugger's Prefs", which is in the
  39. System Folder. Then restart the Macintosh, and you have a new command available :
  40. type "help Translate" to get help. Don't care about the story CRP/SRP, it's not
  41. implemented.
  42.  
  43. Translate needs to call certain privileged instructions, and has to access the
  44. Translation Table. On a protected system, it would be impossible for a normal
  45. program, so Translate cannot be a usual application. The only place on System 7
  46. where you still have privileges, is the Debugger. And that's a good place since
  47. Translate is usefull for debugging. Everything is fine.
  48.  
  49. Translate v1.0ß1 is Beta : I have implemented all the things that are in the
  50. MC68030 manual, except that I don't check the transparent translation registers
  51. (TTx) and I don't care which root pointer I should use (the program always
  52. takes the CRP). But not everything that is simulated gets output : I only put
  53. messages in the most common cases, so I am very interested if there are things
  54. that are not printed, while you think they should be. I have tested this program
  55. with System 7.0ß4 on a MC68030, and it works fine for my system. I have no idea
  56. if it works with a MC68020/MC68851, or with Virtual, or under A/UX : I am
  57. interested in feedback here too. If you use this program often, let me know :
  58. I still wonder what you could be doing with it !
  59.  
  60. Translate is © Copyright by Alain Raynaud (that's me !), but can be copyed and
  61. given freely. I can be reached at :
  62.  
  63. Alain Raynaud
  64. SUPELEC
  65. Plateau de Moulon
  66. 91192 Gif Sur Yvette Cedex
  67. FRANCE
  68.  
  69. E-Mail: Raynaud@Frese51.Bitnet
  70.